<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen: Eigen::EigenSolver&lt; MatrixType_ &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classEigen_1_1EigenSolver.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1EigenSolver-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Eigen::EigenSolver&lt; MatrixType_ &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__DenseLinearSolvers__chapter.html">Dense linear problems and decompositions</a> &raquo; <a class="el" href="group__DenseLinearSolvers__Reference.html">Reference</a> &raquo; <a class="el" href="group__Eigenvalues__Module.html">Eigenvalues module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename MatrixType_&gt;<br />
class Eigen::EigenSolver&lt; MatrixType_ &gt;</h3>

<p>Computes eigenvalues and eigenvectors of general matrices. </p>
<p>This is defined in the Eigenvalues module.</p><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;Eigen/Eigenvalues&gt;</span> </div>
</div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">MatrixType_</td><td>the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the <a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors.">Matrix</a> class template. Currently, only real matrices are supported.</td></tr>
  </table>
  </dd>
</dl>
<p>The eigenvalues and eigenvectors of a matrix \( A \) are scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda v \). If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A V = V D \). The matrix \( V \) is almost always invertible, in which case we have \( A = V D V^{-1} \). This is called the eigendecomposition.</p>
<p>The eigenvalues and eigenvectors of a matrix may be complex, even when the matrix is real. However, we can choose real matrices \( V \) and \( D \) satisfying \( A V = V D \), just like the eigendecomposition, if the matrix \( D \) is not required to be diagonal, but if it is allowed to have blocks of the form </p><p class="formulaDsp">
\[ \begin{bmatrix} u &amp; v \\ -v &amp; u \end{bmatrix} \]
</p>
<p> (where \( u \) and \( v \) are real numbers) on the diagonal. These blocks correspond to complex eigenvalue pairs \( u \pm iv \). We call this variant of the eigendecomposition the pseudo-eigendecomposition.</p>
<p>Call the function <a class="el" href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3" title="Computes eigendecomposition of given matrix.">compute()</a> to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the EigenSolver(const MatrixType&amp;, bool) constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a> and <a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a> functions. The <a class="el" href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17" title="Returns the block-diagonal matrix in the pseudo-eigendecomposition.">pseudoEigenvalueMatrix()</a> and <a class="el" href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2" title="Returns the pseudo-eigenvectors of given matrix.">pseudoEigenvectors()</a> methods allow the construction of the pseudo-eigendecomposition.</p>
<p>The documentation for EigenSolver(const MatrixType&amp;, bool) contains an example of the typical use of this class.</p>
<dl class="section note"><dt>Note</dt><dd>The implementation is adapted from <a href="http://math.nist.gov/javanumerics/jama/">JAMA</a> (public domain). Their code is based on EISPACK.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1MatrixBase.html#a30430fa3d5b4e74d312fd4f502ac984d" title="Computes the eigenvalues of a matrix.">MatrixBase::eigenvalues()</a>, class <a class="el" href="classEigen_1_1ComplexEigenSolver.html" title="Computes eigenvalues and eigenvectors of general complex matrices.">ComplexEigenSolver</a>, class <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html" title="Computes eigenvalues and eigenvectors of selfadjoint matrices.">SelfAdjointEigenSolver</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a789af79c9427e6617fa8cbd96a6a258e"><td class="memItemLeft" align="right" valign="top">typedef std::complex&lt; RealScalar &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a></td></tr>
<tr class="memdesc:a789af79c9427e6617fa8cbd96a6a258e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Complex scalar type for <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7" title="Synonym for the template parameter MatrixType_.">MatrixType</a>.  <a href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">More...</a><br /></td></tr>
<tr class="separator:a789af79c9427e6617fa8cbd96a6a258e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97733b9f7b4a2cc4496d4066e320c50c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classEigen_1_1Matrix.html">Matrix</a>&lt; <a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a>, ColsAtCompileTime, 1, Options &amp;~<a class="el" href="group__enums.html#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f">RowMajor</a>, MaxColsAtCompileTime, 1 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a97733b9f7b4a2cc4496d4066e320c50c">EigenvalueType</a></td></tr>
<tr class="memdesc:a97733b9f7b4a2cc4496d4066e320c50c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for vector of eigenvalues as returned by <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a>.  <a href="classEigen_1_1EigenSolver.html#a97733b9f7b4a2cc4496d4066e320c50c">More...</a><br /></td></tr>
<tr class="separator:a97733b9f7b4a2cc4496d4066e320c50c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1f52c25907e5f00abe236be002eeb89"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classEigen_1_1Matrix.html">Matrix</a>&lt; <a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a>, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#ae1f52c25907e5f00abe236be002eeb89">EigenvectorsType</a></td></tr>
<tr class="memdesc:ae1f52c25907e5f00abe236be002eeb89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for matrix of eigenvectors as returned by <a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a>.  <a href="classEigen_1_1EigenSolver.html#ae1f52c25907e5f00abe236be002eeb89">More...</a><br /></td></tr>
<tr class="separator:ae1f52c25907e5f00abe236be002eeb89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d3d4fb53bbfeb9e96e0f150471a0e81"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="namespaceEigen.html#a62e77e0933482dafde8fe197d9a2cfde">Eigen::Index</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a></td></tr>
<tr class="separator:a9d3d4fb53bbfeb9e96e0f150471a0e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af54c1d4e3e7faec5c1550056b7549fb7"><td class="memItemLeft" align="right" valign="top"><a id="af54c1d4e3e7faec5c1550056b7549fb7"></a>
typedef MatrixType_&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a></td></tr>
<tr class="memdesc:af54c1d4e3e7faec5c1550056b7549fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Synonym for the template parameter <code>MatrixType_</code>. <br /></td></tr>
<tr class="separator:af54c1d4e3e7faec5c1550056b7549fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a066f584d04b0b8ef1411e3eea9cda7f2"><td class="memItemLeft" align="right" valign="top"><a id="a066f584d04b0b8ef1411e3eea9cda7f2"></a>
typedef MatrixType::Scalar&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a066f584d04b0b8ef1411e3eea9cda7f2">Scalar</a></td></tr>
<tr class="memdesc:a066f584d04b0b8ef1411e3eea9cda7f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scalar type for matrices of type <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7" title="Synonym for the template parameter MatrixType_.">MatrixType</a>. <br /></td></tr>
<tr class="separator:a066f584d04b0b8ef1411e3eea9cda7f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9e03d09fd7cfc0120847fcb63aa353f3"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a9e03d09fd7cfc0120847fcb63aa353f3"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3">compute</a> (const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;matrix, bool computeEigenvectors=true)</td></tr>
<tr class="memdesc:a9e03d09fd7cfc0120847fcb63aa353f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes eigendecomposition of given matrix.  <a href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3">More...</a><br /></td></tr>
<tr class="separator:a9e03d09fd7cfc0120847fcb63aa353f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85cf52711e7100b01fda3e329eb86e5e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a85cf52711e7100b01fda3e329eb86e5e">EigenSolver</a> ()</td></tr>
<tr class="memdesc:a85cf52711e7100b01fda3e329eb86e5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="classEigen_1_1EigenSolver.html#a85cf52711e7100b01fda3e329eb86e5e">More...</a><br /></td></tr>
<tr class="separator:a85cf52711e7100b01fda3e329eb86e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccaeb4f7d44c18af60a7b3a1dd91f7a"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a0ccaeb4f7d44c18af60a7b3a1dd91f7a"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a0ccaeb4f7d44c18af60a7b3a1dd91f7a">EigenSolver</a> (const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;matrix, bool computeEigenvectors=true)</td></tr>
<tr class="memdesc:a0ccaeb4f7d44c18af60a7b3a1dd91f7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor; computes eigendecomposition of given matrix.  <a href="classEigen_1_1EigenSolver.html#a0ccaeb4f7d44c18af60a7b3a1dd91f7a">More...</a><br /></td></tr>
<tr class="separator:a0ccaeb4f7d44c18af60a7b3a1dd91f7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a311f148c5d12ecda1eec61e31ea8c3ed"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a311f148c5d12ecda1eec61e31ea8c3ed">EigenSolver</a> (<a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a> size)</td></tr>
<tr class="memdesc:a311f148c5d12ecda1eec61e31ea8c3ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor with memory preallocation.  <a href="classEigen_1_1EigenSolver.html#a311f148c5d12ecda1eec61e31ea8c3ed">More...</a><br /></td></tr>
<tr class="separator:a311f148c5d12ecda1eec61e31ea8c3ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f507ad7ab14797882f474ca8f2773e7"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classEigen_1_1EigenSolver.html#a97733b9f7b4a2cc4496d4066e320c50c">EigenvalueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7">eigenvalues</a> () const</td></tr>
<tr class="memdesc:a0f507ad7ab14797882f474ca8f2773e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the eigenvalues of given matrix.  <a href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7">More...</a><br /></td></tr>
<tr class="separator:a0f507ad7ab14797882f474ca8f2773e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66288022802172e3ee059283b26201d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1EigenSolver.html#ae1f52c25907e5f00abe236be002eeb89">EigenvectorsType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7">eigenvectors</a> () const</td></tr>
<tr class="memdesc:a66288022802172e3ee059283b26201d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the eigenvectors of given matrix.  <a href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7">More...</a><br /></td></tr>
<tr class="separator:a66288022802172e3ee059283b26201d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfebb3f08831cb923511dad5a6e78401"><td class="memItemLeft" align="right" valign="top"><a id="acfebb3f08831cb923511dad5a6e78401"></a>
<a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#acfebb3f08831cb923511dad5a6e78401">getMaxIterations</a> ()</td></tr>
<tr class="memdesc:acfebb3f08831cb923511dad5a6e78401"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum number of iterations. <br /></td></tr>
<tr class="separator:acfebb3f08831cb923511dad5a6e78401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c28d646d456a22a2726f49e4e5e8536"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__enums.html#ga85fad7b87587764e5cf6b513a9e0ee5e">ComputationInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a5c28d646d456a22a2726f49e4e5e8536">info</a> () const</td></tr>
<tr class="separator:a5c28d646d456a22a2726f49e4e5e8536"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4979eafe0aeef06b19ada7fa5e19db17"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17">pseudoEigenvalueMatrix</a> () const</td></tr>
<tr class="memdesc:a4979eafe0aeef06b19ada7fa5e19db17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the block-diagonal matrix in the pseudo-eigendecomposition.  <a href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17">More...</a><br /></td></tr>
<tr class="separator:a4979eafe0aeef06b19ada7fa5e19db17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac306853588d05e71d5c0f883d37327f2"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2">pseudoEigenvectors</a> () const</td></tr>
<tr class="memdesc:ac306853588d05e71d5c0f883d37327f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pseudo-eigenvectors of given matrix.  <a href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2">More...</a><br /></td></tr>
<tr class="separator:ac306853588d05e71d5c0f883d37327f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fbbdf49cf33b52b1c581bf06319bb91"><td class="memItemLeft" align="right" valign="top"><a id="a5fbbdf49cf33b52b1c581bf06319bb91"></a>
<a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1EigenSolver.html#a5fbbdf49cf33b52b1c581bf06319bb91">setMaxIterations</a> (<a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a> maxIters)</td></tr>
<tr class="memdesc:a5fbbdf49cf33b52b1c581bf06319bb91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of iterations allowed. <br /></td></tr>
<tr class="separator:a5fbbdf49cf33b52b1c581bf06319bb91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a789af79c9427e6617fa8cbd96a6a258e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a789af79c9427e6617fa8cbd96a6a258e">&#9670;&nbsp;</a></span>ComplexScalar</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef std::complex&lt;RealScalar&gt; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Complex scalar type for <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7" title="Synonym for the template parameter MatrixType_.">MatrixType</a>. </p>
<p>This is <code>std::complex&lt;Scalar&gt;</code> if <a class="el" href="classEigen_1_1EigenSolver.html#a066f584d04b0b8ef1411e3eea9cda7f2" title="Scalar type for matrices of type MatrixType.">Scalar</a> is real (e.g., <code>float</code> or <code>double</code>) and just <code>Scalar</code> if <a class="el" href="classEigen_1_1EigenSolver.html#a066f584d04b0b8ef1411e3eea9cda7f2" title="Scalar type for matrices of type MatrixType.">Scalar</a> is complex. </p>

</div>
</div>
<a id="a97733b9f7b4a2cc4496d4066e320c50c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97733b9f7b4a2cc4496d4066e320c50c">&#9670;&nbsp;</a></span>EigenvalueType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classEigen_1_1Matrix.html">Matrix</a>&lt;<a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a>, ColsAtCompileTime, 1, Options &amp; ~<a class="el" href="group__enums.html#ggaacded1a18ae58b0f554751f6cdf9eb13a77c993a8d9f6efe5c1159fb2ab07dd4f">RowMajor</a>, MaxColsAtCompileTime, 1&gt; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html#a97733b9f7b4a2cc4496d4066e320c50c">EigenvalueType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type for vector of eigenvalues as returned by <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a>. </p>
<p>This is a column vector with entries of type <a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e" title="Complex scalar type for MatrixType.">ComplexScalar</a>. The length of the vector is the size of <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7" title="Synonym for the template parameter MatrixType_.">MatrixType</a>. </p>

</div>
</div>
<a id="ae1f52c25907e5f00abe236be002eeb89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1f52c25907e5f00abe236be002eeb89">&#9670;&nbsp;</a></span>EigenvectorsType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classEigen_1_1Matrix.html">Matrix</a>&lt;<a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e">ComplexScalar</a>, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime&gt; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html#ae1f52c25907e5f00abe236be002eeb89">EigenvectorsType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type for matrix of eigenvectors as returned by <a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a>. </p>
<p>This is a square matrix with entries of type <a class="el" href="classEigen_1_1EigenSolver.html#a789af79c9427e6617fa8cbd96a6a258e" title="Complex scalar type for MatrixType.">ComplexScalar</a>. The size is the same as the size of <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7" title="Synonym for the template parameter MatrixType_.">MatrixType</a>. </p>

</div>
</div>
<a id="a9d3d4fb53bbfeb9e96e0f150471a0e81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d3d4fb53bbfeb9e96e0f150471a0e81">&#9670;&nbsp;</a></span>Index</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="namespaceEigen.html#a62e77e0933482dafde8fe197d9a2cfde">Eigen::Index</a> <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd>since <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a> 3.3 </dd></dl>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a85cf52711e7100b01fda3e329eb86e5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85cf52711e7100b01fda3e329eb86e5e">&#9670;&nbsp;</a></span>EigenSolver() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>The default constructor is useful in cases in which the user intends to perform decompositions via EigenSolver::compute(const MatrixType&amp;, bool).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3" title="Computes eigendecomposition of given matrix.">compute()</a> for an example. </dd></dl>

</div>
</div>
<a id="a311f148c5d12ecda1eec61e31ea8c3ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a311f148c5d12ecda1eec61e31ea8c3ed">&#9670;&nbsp;</a></span>EigenSolver() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classEigen_1_1EigenSolver.html#a9d3d4fb53bbfeb9e96e0f150471a0e81">Index</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor with memory preallocation. </p>
<p>Like the default constructor but with preallocation of the internal data according to the specified problem <em>size</em>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a85cf52711e7100b01fda3e329eb86e5e" title="Default constructor.">EigenSolver()</a> </dd></dl>

</div>
</div>
<a id="a0ccaeb4f7d44c18af60a7b3a1dd91f7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ccaeb4f7d44c18af60a7b3a1dd91f7a">&#9670;&nbsp;</a></span>EigenSolver() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;&#160;</td>
          <td class="paramname"><em>matrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>computeEigenvectors</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor; computes eigendecomposition of given matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">matrix</td><td>Square matrix whose eigendecomposition is to be computed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">computeEigenvectors</td><td>If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.</td></tr>
  </table>
  </dd>
</dl>
<p>This constructor calls <a class="el" href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3" title="Computes eigendecomposition of given matrix.">compute()</a> to compute the eigenvalues and eigenvectors.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> A = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(6,6);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is a random 6x6 matrix, A:&quot;</span> &lt;&lt; endl &lt;&lt; A &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line">EigenSolver&lt;MatrixXd&gt; es(A);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of A are:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvalues() &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The matrix of eigenvectors, V, is:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvectors() &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line">complex&lt;double&gt; lambda = es.eigenvalues()[0];</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Consider the first eigenvalue, lambda = &quot;</span> &lt;&lt; lambda &lt;&lt; endl;</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga495330872c3cd279e5fd0419747ada55">VectorXcd</a> v = es.eigenvectors().col(0);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;If v is the corresponding eigenvector, then lambda * v = &quot;</span> &lt;&lt; endl &lt;&lt; lambda * v &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;... and A * v = &quot;</span> &lt;&lt; endl &lt;&lt; A.cast&lt;complex&lt;double&gt; &gt;() * v &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#gaadf0b25f5437fbddaf84324419418be8">MatrixXcd</a> D = es.eigenvalues().asDiagonal();</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#gaadf0b25f5437fbddaf84324419418be8">MatrixXcd</a> V = es.eigenvectors();</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Finally, V * D * V^(-1) = &quot;</span> &lt;&lt; endl &lt;&lt; V * D * V.inverse() &lt;&lt; endl;</div>
<div class="ttc" id="aclassEigen_1_1DenseBase_html_ae814abb451b48ed872819192dc188c19"><div class="ttname"><a href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">Eigen::DenseBase::Random</a></div><div class="ttdeci">static const RandomReturnType Random()</div><div class="ttdef"><b>Definition:</b> Random.h:114</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga495330872c3cd279e5fd0419747ada55"><div class="ttname"><a href="group__matrixtypedefs.html#ga495330872c3cd279e5fd0419747ada55">Eigen::VectorXcd</a></div><div class="ttdeci">Matrix&lt; std::complex&lt; double &gt;, Dynamic, 1 &gt; VectorXcd</div><div class="ttdoc">Dynamic×1 vector of type std::complex&lt;double&gt;.</div><div class="ttdef"><b>Definition:</b> Matrix.h:503</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga99b41a69f0bf64eadb63a97f357ab412"><div class="ttname"><a href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">Eigen::MatrixXd</a></div><div class="ttdeci">Matrix&lt; double, Dynamic, Dynamic &gt; MatrixXd</div><div class="ttdoc">Dynamic×Dynamic matrix of type double.</div><div class="ttdef"><b>Definition:</b> Matrix.h:501</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_gaadf0b25f5437fbddaf84324419418be8"><div class="ttname"><a href="group__matrixtypedefs.html#gaadf0b25f5437fbddaf84324419418be8">Eigen::MatrixXcd</a></div><div class="ttdeci">Matrix&lt; std::complex&lt; double &gt;, Dynamic, Dynamic &gt; MatrixXcd</div><div class="ttdoc">Dynamic×Dynamic matrix of type std::complex&lt;double&gt;.</div><div class="ttdef"><b>Definition:</b> Matrix.h:503</div></div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">Here is a random 6x6 matrix, A:
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

The eigenvalues of A are:
  (0.049,1.06)
 (0.049,-1.06)
     (0.967,0)
     (0.353,0)
 (0.618,0.129)
(0.618,-0.129)
The matrix of eigenvectors, V, is:
 (-0.292,-0.454)   (-0.292,0.454)      (-0.0607,0)       (-0.733,0)    (0.59,-0.121)     (0.59,0.121)
  (0.134,-0.104)    (0.134,0.104)       (-0.799,0)        (0.136,0)    (0.334,0.368)   (0.334,-0.368)
  (-0.422,-0.18)    (-0.422,0.18)        (0.192,0)       (0.0563,0)  (-0.335,-0.143)   (-0.335,0.143)
 (-0.589,0.0274) (-0.589,-0.0274)      (-0.0788,0)       (-0.627,0)   (0.322,-0.155)    (0.322,0.155)
  (-0.248,0.132)  (-0.248,-0.132)        (0.401,0)        (0.218,0) (-0.335,-0.0761)  (-0.335,0.0761)
    (0.105,0.18)    (0.105,-0.18)       (-0.392,0)     (-0.00564,0)  (-0.0324,0.103) (-0.0324,-0.103)

Consider the first eigenvalue, lambda = (0.049,1.06)
If v is the corresponding eigenvector, then lambda * v = 
  (0.466,-0.331)
   (0.117,0.137)
   (0.17,-0.456)
(-0.0578,-0.622)
 (-0.152,-0.256)
   (-0.186,0.12)
... and A * v = 
  (0.466,-0.331)
   (0.117,0.137)
   (0.17,-0.456)
(-0.0578,-0.622)
 (-0.152,-0.256)
   (-0.186,0.12)

Finally, V * D * V^(-1) = 
          (0.68,0)  (-0.33,-5.55e-17)   (-0.27,6.66e-16)         (-0.717,0) (-0.687,-8.88e-16) (0.0259,-4.44e-16)
 (-0.211,2.22e-16)   (0.536,3.21e-17)         (0.0268,0)          (0.214,0)         (-0.198,0)  (0.678,-4.44e-16)
  (0.566,4.44e-16)  (-0.444,5.55e-17)   (0.904,1.11e-16) (-0.967,-3.33e-16)   (-0.74,4.44e-16)      (0.225,2e-15)
 (0.597,-4.44e-16)  (0.108,-2.78e-17)   (0.832,3.33e-16) (-0.514,-1.11e-16) (-0.782,-1.33e-15)  (-0.408,1.33e-15)
  (0.823,8.88e-16) (-0.0452,4.16e-17)  (0.271,-3.89e-16) (-0.726,-6.66e-16)   (0.998,1.33e-15)   (0.275,2.22e-15)
(-0.605,-9.71e-17)   (0.258,4.16e-17)  (0.435,-8.33e-17)   (0.608,1.18e-16) (-0.563,-2.78e-16) (0.0486,-2.95e-16)
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a9e03d09fd7cfc0120847fcb63aa353f3" title="Computes eigendecomposition of given matrix.">compute()</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9e03d09fd7cfc0120847fcb63aa353f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e03d09fd7cfc0120847fcb63aa353f3">&#9670;&nbsp;</a></span>compute()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a>&amp; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::compute </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;&#160;</td>
          <td class="paramname"><em>matrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>computeEigenvectors</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes eigendecomposition of given matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">matrix</td><td>Square matrix whose eigendecomposition is to be computed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">computeEigenvectors</td><td>If true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to <code>*this</code> </dd></dl>
<p>This function computes the eigenvalues of the real matrix <code>matrix</code>. The <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a> function can be used to retrieve them. If <code>computeEigenvectors</code> is true, then the eigenvectors are also computed and can be retrieved by calling <a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a>.</p>
<p>The matrix is first reduced to real Schur form using the <a class="el" href="classEigen_1_1RealSchur.html" title="Performs a real Schur decomposition of a square matrix.">RealSchur</a> class. The Schur decomposition is then used to compute the eigenvalues and eigenvectors.</p>
<p>The cost of the computation is dominated by the cost of the Schur decomposition, which is very approximately \( 25n^3 \) (where \( n \) is the size of the matrix) if <code>computeEigenvectors</code> is true, and \( 10n^3 \) if <code>computeEigenvectors</code> is false.</p>
<p>This method reuses of the allocated data in the <a class="el" href="classEigen_1_1EigenSolver.html" title="Computes eigenvalues and eigenvectors of general matrices.">EigenSolver</a> object.</p>
<p>Example: </p><div class="fragment"><div class="line">EigenSolver&lt;MatrixXf&gt; es;</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga731599f782380312960376c43450eb48">MatrixXf</a> A = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXf::Random</a>(4,4);</div>
<div class="line">es.compute(A, <span class="comment">/* computeEigenvectors = */</span> <span class="keyword">false</span>);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of A are: &quot;</span> &lt;&lt; es.eigenvalues().transpose() &lt;&lt; endl;</div>
<div class="line">es.compute(A + <a class="code" href="classEigen_1_1MatrixBase.html#a98bb9a0f705c6dfde85b0bfff31bf88f">MatrixXf::Identity</a>(4,4), <span class="keyword">false</span>); <span class="comment">// re-use es to compute eigenvalues of A+I</span></div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of A+I are: &quot;</span> &lt;&lt; es.eigenvalues().transpose() &lt;&lt; endl;</div>
<div class="ttc" id="aclassEigen_1_1MatrixBase_html_a98bb9a0f705c6dfde85b0bfff31bf88f"><div class="ttname"><a href="classEigen_1_1MatrixBase.html#a98bb9a0f705c6dfde85b0bfff31bf88f">Eigen::MatrixBase::Identity</a></div><div class="ttdeci">static const IdentityReturnType Identity()</div><div class="ttdef"><b>Definition:</b> CwiseNullaryOp.h:801</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga731599f782380312960376c43450eb48"><div class="ttname"><a href="group__matrixtypedefs.html#ga731599f782380312960376c43450eb48">Eigen::MatrixXf</a></div><div class="ttdeci">Matrix&lt; float, Dynamic, Dynamic &gt; MatrixXf</div><div class="ttdoc">Dynamic×Dynamic matrix of type float.</div><div class="ttdef"><b>Definition:</b> Matrix.h:500</div></div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">The eigenvalues of A are:    (0.755,0.528)   (0.755,-0.528)  (-0.323,0.0965) (-0.323,-0.0965)
The eigenvalues of A+I are:    (1.75,0.528)   (1.75,-0.528)  (0.677,0.0965) (0.677,-0.0965)
</pre> 
</div>
</div>
<a id="a0f507ad7ab14797882f474ca8f2773e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f507ad7ab14797882f474ca8f2773e7">&#9670;&nbsp;</a></span>eigenvalues()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classEigen_1_1EigenSolver.html#a97733b9f7b4a2cc4496d4066e320c50c">EigenvalueType</a>&amp; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::eigenvalues </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the eigenvalues of given matrix. </p>
<dl class="section return"><dt>Returns</dt><dd>A const reference to the column vector containing the eigenvalues.</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Either the constructor EigenSolver(const MatrixType&amp;,bool) or the member function compute(const MatrixType&amp;, bool) has been called before.</dd></dl>
<p>The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> ones = <a class="code" href="classEigen_1_1DenseBase.html#a2755cb4023f7376880523626a8e05101">MatrixXd::Ones</a>(3,3);</div>
<div class="line">EigenSolver&lt;MatrixXd&gt; es(ones, <span class="keyword">false</span>);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of the 3x3 matrix of ones are:&quot;</span> </div>
<div class="line">     &lt;&lt; endl &lt;&lt; es.eigenvalues() &lt;&lt; endl;</div>
<div class="ttc" id="aclassEigen_1_1DenseBase_html_a2755cb4023f7376880523626a8e05101"><div class="ttname"><a href="classEigen_1_1DenseBase.html#a2755cb4023f7376880523626a8e05101">Eigen::DenseBase::Ones</a></div><div class="ttdeci">static const ConstantReturnType Ones()</div><div class="ttdef"><b>Definition:</b> CwiseNullaryOp.h:672</div></div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">The eigenvalues of the 3x3 matrix of ones are:
(-5.31e-17,0)
        (3,0)
        (0,0)
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a>, <a class="el" href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17" title="Returns the block-diagonal matrix in the pseudo-eigendecomposition.">pseudoEigenvalueMatrix()</a>, <a class="el" href="classEigen_1_1MatrixBase.html#a30430fa3d5b4e74d312fd4f502ac984d" title="Computes the eigenvalues of a matrix.">MatrixBase::eigenvalues()</a> </dd></dl>

</div>
</div>
<a id="a66288022802172e3ee059283b26201d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66288022802172e3ee059283b26201d7">&#9670;&nbsp;</a></span>eigenvectors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a>&lt; <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a> &gt;::<a class="el" href="classEigen_1_1EigenSolver.html#ae1f52c25907e5f00abe236be002eeb89">EigenvectorsType</a> <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a> &gt;::eigenvectors</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the eigenvectors of given matrix. </p>
<dl class="section return"><dt>Returns</dt><dd>Matrix whose columns are the (possibly complex) eigenvectors.</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Either the constructor EigenSolver(const MatrixType&amp;,bool) or the member function compute(const MatrixType&amp;, bool) has been called before, and <code>computeEigenvectors</code> was set to true (the default).</dd></dl>
<p>Column \( k \) of the returned matrix is an eigenvector corresponding to eigenvalue number \( k \) as returned by <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a>. The eigenvectors are normalized to have (Euclidean) norm equal to one. The matrix returned by this function is the matrix \( V \) in the eigendecomposition \( A = V D V^{-1} \), if it exists.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> ones = <a class="code" href="classEigen_1_1DenseBase.html#a2755cb4023f7376880523626a8e05101">MatrixXd::Ones</a>(3,3);</div>
<div class="line">EigenSolver&lt;MatrixXd&gt; es(ones);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The first eigenvector of the 3x3 matrix of ones is:&quot;</span></div>
<div class="line">     &lt;&lt; endl &lt;&lt; es.eigenvectors().col(0) &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">The first eigenvector of the 3x3 matrix of ones is:
(-0.816,0)
 (0.408,0)
 (0.408,0)
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a>, <a class="el" href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2" title="Returns the pseudo-eigenvectors of given matrix.">pseudoEigenvectors()</a> </dd></dl>

</div>
</div>
<a id="a5c28d646d456a22a2726f49e4e5e8536"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c28d646d456a22a2726f49e4e5e8536">&#9670;&nbsp;</a></span>info()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__enums.html#ga85fad7b87587764e5cf6b513a9e0ee5e">ComputationInfo</a> <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::info </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>NumericalIssue if the input contains INF or NaN values or overflow occurred. Returns Success otherwise. </dd></dl>

</div>
</div>
<a id="a4979eafe0aeef06b19ada7fa5e19db17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4979eafe0aeef06b19ada7fa5e19db17">&#9670;&nbsp;</a></span>pseudoEigenvalueMatrix()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a> <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a> &gt;::pseudoEigenvalueMatrix</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the block-diagonal matrix in the pseudo-eigendecomposition. </p>
<dl class="section return"><dt>Returns</dt><dd>A block-diagonal matrix.</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Either the constructor EigenSolver(const MatrixType&amp;,bool) or the member function compute(const MatrixType&amp;, bool) has been called before.</dd></dl>
<p>The matrix \( D \) returned by this function is real and block-diagonal. The blocks on the diagonal are either 1-by-1 or 2-by-2 blocks of the form \( \begin{bmatrix} u &amp; v \\ -v &amp; u \end{bmatrix} \). These blocks are not sorted in any particular order. The matrix \( D \) and the matrix \( V \) returned by <a class="el" href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2" title="Returns the pseudo-eigenvectors of given matrix.">pseudoEigenvectors()</a> satisfy \( AV = VD \).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#ac306853588d05e71d5c0f883d37327f2" title="Returns the pseudo-eigenvectors of given matrix.">pseudoEigenvectors()</a> for an example, <a class="el" href="classEigen_1_1EigenSolver.html#a0f507ad7ab14797882f474ca8f2773e7" title="Returns the eigenvalues of given matrix.">eigenvalues()</a> </dd></dl>

</div>
</div>
<a id="ac306853588d05e71d5c0f883d37327f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac306853588d05e71d5c0f883d37327f2">&#9670;&nbsp;</a></span>pseudoEigenvectors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classEigen_1_1EigenSolver.html#af54c1d4e3e7faec5c1550056b7549fb7">MatrixType</a>&amp; <a class="el" href="classEigen_1_1EigenSolver.html">Eigen::EigenSolver</a>&lt; MatrixType_ &gt;::pseudoEigenvectors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the pseudo-eigenvectors of given matrix. </p>
<dl class="section return"><dt>Returns</dt><dd>Const reference to matrix whose columns are the pseudo-eigenvectors.</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Either the constructor EigenSolver(const MatrixType&amp;,bool) or the member function compute(const MatrixType&amp;, bool) has been called before, and <code>computeEigenvectors</code> was set to true (the default).</dd></dl>
<p>The real matrix \( V \) returned by this function and the block-diagonal matrix \( D \) returned by <a class="el" href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17" title="Returns the block-diagonal matrix in the pseudo-eigendecomposition.">pseudoEigenvalueMatrix()</a> satisfy \( AV = VD \).</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> A = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(6,6);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is a random 6x6 matrix, A:&quot;</span> &lt;&lt; endl &lt;&lt; A &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line">EigenSolver&lt;MatrixXd&gt; es(A);</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> D = es.pseudoEigenvalueMatrix();</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> V = es.pseudoEigenvectors();</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The pseudo-eigenvalue matrix D is:&quot;</span> &lt;&lt; endl &lt;&lt; D &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The pseudo-eigenvector matrix V is:&quot;</span> &lt;&lt; endl &lt;&lt; V &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Finally, V * D * V^(-1) = &quot;</span> &lt;&lt; endl &lt;&lt; V * D * V.inverse() &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">Here is a random 6x6 matrix, A:
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486

The pseudo-eigenvalue matrix D is:
 0.049   1.06      0      0      0      0
 -1.06  0.049      0      0      0      0
     0      0  0.967      0      0      0
     0      0      0  0.353      0      0
     0      0      0      0  0.618  0.129
     0      0      0      0 -0.129  0.618
The pseudo-eigenvector matrix V is:
  -0.571   -0.888   -0.066    -1.13     17.2    -3.53
   0.263   -0.204   -0.869     0.21     9.73     10.7
  -0.827   -0.352    0.209   0.0871    -9.74    -4.17
   -1.15   0.0535  -0.0857   -0.971     9.36    -4.52
  -0.485    0.258    0.436    0.337    -9.74    -2.21
   0.206    0.353   -0.426 -0.00873   -0.944     2.98
Finally, V * D * V^(-1) = 
   0.68   -0.33   -0.27  -0.717  -0.687  0.0259
 -0.211   0.536  0.0268   0.214  -0.198   0.678
  0.566  -0.444   0.904  -0.967   -0.74   0.225
  0.597   0.108   0.832  -0.514  -0.782  -0.408
  0.823 -0.0452   0.271  -0.726   0.998   0.275
 -0.605   0.258   0.435   0.608  -0.563  0.0486
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1EigenSolver.html#a4979eafe0aeef06b19ada7fa5e19db17" title="Returns the block-diagonal matrix in the pseudo-eigendecomposition.">pseudoEigenvalueMatrix()</a>, <a class="el" href="classEigen_1_1EigenSolver.html#a66288022802172e3ee059283b26201d7" title="Returns the eigenvectors of given matrix.">eigenvectors()</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="EigenSolver_8h_source.html">EigenSolver.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1EigenSolver.html">EigenSolver</a></li>
    <li class="footer">Generated on Thu Apr 21 2022 13:07:55 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
